  <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Tableau de bord
                        <small>Control panel</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="<?=site_url()?>"><i class="fa fa-dashboard"></i> Accueil</a></li>
                        <li class="active">Tableau de bord</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">

                    <!-- Small boxes (Stat box) -->
                    <div class="row">
                        <div class="col-lg-3 col-xs-6">
                            <!-- small box -->
                            <div class="small-box bg-aqua" onclick="document.location.href='<?=site_url()?>properties'">
                                <div class="inner">
                                    <h3>
                                         <?=$property_count?>
                                    </h3>
                                    <p>
                                        Fiche de Bien
                                    </p>
                                </div>
                                <div class="icon">
                                    <i class="fa fa-home"></i>
                                </div>
                                <a href="<?=site_url()?>properties" class="small-box-footer">
                                    Plus des infos <i class="fa fa-arrow-circle-right"></i>
                                </a>
                            </div>
                        </div><!-- ./col -->
                        <div class="col-lg-3 col-xs-6">
                            <!-- small box -->
                            <div class="small-box bg-green" onclick="document.location.href='<?=site_url()?>customers'">
                                <div class="inner">
                                    <h3>
                                       <?=$customer_count?>
                                    </h3>
                                    <p>
                                        Clients Enregistrés
                                    </p>
                                </div>
                                <div class="icon">
                                    <i class="fa fa-users"></i>
                                </div>
                                <a href="<?=site_url()?>customers" class="small-box-footer">
                                    Plus des infos <i class="fa fa-arrow-circle-right"></i>
                                </a>
                            </div>
                        </div><!-- ./col -->
                        <div class="col-lg-3 col-xs-6">
                            <!-- small box -->
                            <div class="small-box bg-yellow" onclick="document.location.href='<?=site_url()?>users'">
                                <div class="inner">
                                    <h3>
                                        <?=$user_count?>
                                    </h3>
                                    <p>
                                        Utilisateurs
                                    </p>
                                </div>
                                <div class="icon">
                                    <i class="ion ion-person-add"></i>
                                </div>
                                <a href="<?=site_url()?>users" class="small-box-footer">
                                    Plus des infos <i class="fa fa-arrow-circle-right"></i>
                                </a>
                            </div>
                        </div><!-- ./col -->
                        <div class="col-lg-3 col-xs-6">
                            <!-- small box -->
                            <div class="small-box bg-red" onclick="document.location.href='<?=site_url()?>calendar'">
                                <div class="inner">
                                    <h3>
                                        <?=$task_count?>
                                    </h3>
                                    <p>
                                       Suivis..
                                    </p>
                                </div>
                                <div class="icon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                <a href="<?=site_url()?>calendar" class="small-box-footer">
                                    Plus des infos <i class="fa fa-arrow-circle-right"></i>
                                </a>
                            </div>
                              
                        </div><!-- ./col -->
                      <div class="clearfix"></div>
                    </div><!-- /.row -->
					</section>
					<section class="content">
                    <!-- top row -->
                    <div class="row">
                        <div class="post-box col-lg-3  col-xs-6 col-sm-6 col-md-3 ">
<div class="thumbnail">
                 <!-- small box -->
                            <div class="small-box bg-blue" onclick="document.location.href='<?=site_url()?>properties/addNewProperty'">
                                <div class="inner">
                                    <h4>
                                       Ajouter un bien
                                    </h4>
                                    <p>
                                      ***
                                    </p>
                                </div>
                                <div class="icon">
                                    <i class="fa fa-plus-circle"></i>
                                </div>
                                <a href="<?=site_url()?>properties/addNewProperty" class="small-box-footer">
                                    nouveau bien <i class="fa fa-arrow-circle-right"></i>
                                </a>
                            </div>


 </div>
  </div>
                      <?php foreach ($propertyPreview as $p):?>
                      	 <div class="post-box col-lg-3 col-xs-6 col-sm-6 col-md-3 item_<?=$p->id?>">
    <div class="thumbnail">
      <a href="<?=site_url()?>properties/viewProperty/<?=$p->id?>" >
			 <?php  if($p->photos){?>
			 <img src="<?=base_url()?>uploads/thumbs/<?=$p->photos[0]->filename_s?>"  >
			 <?php }else{?>
			 <img src="<?=base_url()?>uploads/thumbs/thumb_default.png"  >
			 <?php }?>
   
		</a>
      <div class="caption">
      	<p><b>Adresse:</b> <?=$p->number?> <?=$p->address?> <?=$p->po?> <?=$p->city?></p>
     	<p><b>Crée:</b> <?=date('d-M-Y  @ H:i',strtotime($p->date_create))?> </p>        
      </div>
    </div>
  </div>
 
                      <?php endforeach;?>
                    </div>
                    <!-- /.row -->


                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
        <!-- The blueimp Gallery widget -->
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" >
    <div class="slides"></div>
    <h3 class="title"></h3>
    <a class="prev">‹</a>
    <a class="next">›</a>
    <a class="close">×</a>
    <a class="play-pause"></a>
    <ol class="indicator"></ol>
</div>